import { useRequire } from "@/api/instance";
import {
  BaseSearchProp,
  BaseSearchResult,
  DataSearchProp,
  DataSearchResult,
  SeniorSearchProp
} from "$/elasticsearch-client";

export const clientSearchDataApi = (id: string, props: DataSearchProp) => {
  return useRequire<DataSearchResult>("/api/client/search/data", { id, props });
};

export const clientSearchBaseApi = (id: string, props: BaseSearchProp) => {
  return useRequire<BaseSearchResult>("/api/client/search/base", { id, props });
};
export const clientSearchSeniorApi = (id: string, props: SeniorSearchProp) => {
  return useRequire<string>("/api/client/search/senior", { id, props });
};
